package ldh.im.fxbase.rpc.service;

import ldh.im.dto.base.OkResp;
import ldh.im.dto.business.av.AvInvitationReq;
import ldh.im.dto.business.item.InvitationResultList;
import ldh.im.dto.business.webrtc.WebRtcCancelReq;
import ldh.im.dto.business.webrtc.WebRtcInvitationReq;
import ldh.im.dto.business.webrtc.WebRtcInvitationResultReq;
import ldh.rpc.Rpc;
import ldh.rpc.RpcMapper;
import ldh.rpc.exception.RpcException;

@Rpc
public interface RpcWebRtcService {

    /**
     * 发起语音、视频聊天邀请
     * @param avInvitationReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path="avInvitation")
    InvitationResultList sendAvInvitation(AvInvitationReq avInvitationReq) throws RpcException;

    /**
     * (WebRtc) 发起语音、视频聊天邀请
     * @param webRtcInvitationReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path="webRtcInvitation")
    InvitationResultList sendWebRtcInvitation(WebRtcInvitationReq webRtcInvitationReq) throws RpcException;

    /**
     * (WebRtc) 邀请应答接口：接受或不接受
     * @param invitationResult
     * @return
     * @throws RpcException
     */
    @RpcMapper(path="webRtcInvitationResult")
    OkResp sendWebRtcInvitationResult(WebRtcInvitationResultReq invitationResult) throws RpcException;

    /**
     * (WebRtc) 取消聊天
     * @param webRtcCancelReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path="webRtcCancel")
    OkResp sendWebRtcCancel(WebRtcCancelReq webRtcCancelReq) throws RpcException;
}
